
function* gen(){
    yield 1;
    yield 2;
    yield 3;
}
let it = gen();

try{
    it.next();
    it.throw('异常错误')
}catch(error){
 console.log(error)
}